<?php

define('DS', DIRECTORY_SEPARATOR);

define('IS_REWRITE', true );

define('KEYWORD', 'key13640661_2010_hjdsYT76yyd*&thhYTIdkd98786djkd&^578kjjhjhUTTb767GGTtgvdd_98876'); //密钥
define('keyPrefixFlag', '13640661'); //密码串前缀
define('ROOTPATH', str_replace('/',DS,$_SERVER['DOCUMENT_ROOT']) . DS . getWebRoot() );

define('HOST', $_SERVER['HTTP_HOST'] .'/' );
define('HOST_NAME', $_SERVER['HTTP_HOST']  );
define('HOSTROOT', 'http://'.HOST . str_replace('\\','/',getWebRoot()) );
define('WEB_ROOT_PATH', 'http://'.HOST . str_replace('\\','/',getWebRoot()) );
define('ROOT_PATH', '/'.getWebRoot());
define('JSLAB_PATH', ROOT_PATH .'jslab/' );
define('JS_PATH', ROOT_PATH .'js/' );


	
//数据库配置信息

require('config_db_info.php');




//  globel 
date_default_timezone_set('Asia/Shanghai');//list
define('PAGE_SIZE', 10 ); 
define('PAGE_LEN', 10 ); 
define('PAGE_SIZE_BIG', 20 ); 
define('PAGE_LEN', 10 ); 
define('THEME', 'default');
define('THEME_PATH', ROOT_PATH.'theme/default/');
define('GLOBEL_FILE_SIZE', 300 * 1000 * 1024 );   
define('SPLIT_STRING', '[julying.com][王子墨]' );  
define('GOTO_TIME',  0.5 ); //秒
define('INDEX_COMMEND_PATH',  'indexcommend' . DS );
define('FIND_PASS_TIMES',  3 ); // FIND PASS TIMES ,everyday
define('FIND_PASS_URL_TIME_LOST',  7 ); // day



define('PASS_MIN_LEN', 6 );// 密码


define('BAD_FILE_TYPE','asp,aspx,php,cgi,exe,com,jsp,msi,dll,html,htm,hta,vbs,vb,js'); //安全策略，上传文件类型黑名单。


// 允许引用本站资源的网站
define('QUOTE_SITES' , '|design.com|localhost|127.0.0.1|design.comdesignlab.com|hid2.comdesignlab.com|hid3g.comdesignlab.com|engine.lotusprize.com|design.hnu.cn' );

// mail 
define('EMAIL_USER','design.comdesignlab@gmail.com');
define('EMAIL_PASS','423789298');

define('MEDIA_THUMB', THEME_PATH .'images/mediaThumb.jpg'); 
define( 'UPLOADFILE_PATH', 'uploadfile/'); // 上传文件路径




//  UPLOAD PHOTO
define( 'TMP_PATH', 'tmp'. DS); //


define( 'MEDIAYHUMBPHOTO_PATH', 'mediathumb'. DS); // media 缩略图路径
define( 'MEDIAPHOTO_PATH', MEDIAYHUMBPHOTO_PATH); // media 说明图
define( 'MEDIA_THUMB_WIDTH', 210); // media 缩略图路径
define( 'MEDIA_THUMB_HEIGHT', 118); // media 缩略图路径

define( 'PHOTO_MAX_WIDEH', 550); // media 缩略图路径
define( 'PHOTO_MAX_HEIGHT', 2000); // media 缩略图路径

define( 'MEDIA_STAR', 5); // media 缩略图路径

//define( 'MEDIA_PATH', 'mediathumb/'); // media 缩略图路径







define( 'MAX_FILE_SIZE', 300 * 1024 * 1024 ); //
define( 'MAX_PHOTO_SIZE', 8 * 1024 * 1024 ); //
define( 'JPEG_QUALITY' , 95 ); //
define( 'UPLOAD_CROP_MAX_WIDTH' , 500 ); //
define( 'UPLOAD_CROP_MAX_HEIGHT' , 500 ); //

define( 'THUMB_WIDTH' , 320 ); //
define( 'THUMB_HEIGHT' , 180 ); //


/*upload
define( 'Tag_Max_Length' , 40 ); //
define( 'Tag_Max_Num' , 8 ); //
*/

// media list
define('MEDIA_PAGESIZE' , 10);
define('MEDIA_PAGELISTSIZE' , 10);



//reg
define( 'REG_SUCCESS_JUMP_TIME' , 3 ); // 注册成功后 ，自动跳转时间


// user
define( 'USERFACE_BIG_PATH',  'userfacebig'. DS); //
define( 'USERFACE_PATH',  'userface'. DS); //
define( 'USERFACE_BIG_WIDTH'  , 120 ); //
define( 'USERFACE_BIG_HEIGHT' , 120 ); //
define( 'USERFACE_SMALL_WIDTH'  , 60 ); //
define( 'USERFACE_SMALL_HEIGHT' , 60 ); //
define( 'USERFACE_BIG', THEME_PATH .'images/faceBig.jpg'); //
define( 'USERFACE', THEME_PATH .'images/face.jpg'); //



define( 'FILE_LIST_DESCRIPTION_LEN' , 200 ); // 文章列表 简介字数



//  comments
define('COMMENT_PAGE' , 25);
define('COMMENT_INTERVAL' , 3 );//评论时间间隔，单位 秒/s













//////////////////////// task

define('TASK_FILE_PATH' , 'taskfile'. DS );
define('TASK_THUMB' , THEME_PATH .'images/task.jpg');
define('TASK_THUMB_WIDTH', 210);  
define('TASK_THUMB_HEIGHT', 118); 
define('TASK_STAR', 7); 


/*  invite */
define('INVITE_SPLIT_STRING','|-_-|');



/**/
define('USER_CAN_WRITE_FOLDER', UPLOADFILE_PATH.'|'.MEDIAPHOTO_PATH.'|'.TMP_PATH.'|'.MEDIAYHUMBPHOTO_PATH.'|'.USERFACE_BIG_PATH.'|'.USERFACE_PATH.'|'.TASK_FILE_PATH );


function getWebRoot(){
	$tmp = explode('/',$_SERVER['SCRIPT_NAME']);
	$web_root_path = '/';
	$count = count($tmp);
	if($count == 2)
		return '';	
	for($i = 1; $i< $count - 1; $i++){
		$web_root_path .= '/'. $tmp[$i] ;
	}
	$web_root_path =  str_replace('//','',$web_root_path) .'/';
	$web_root_path = str_replace('/',  DS , $web_root_path );
	$web_root_path = str_replace('\\',  DS , $web_root_path );
	return $web_root_path;	 
}


define('BAD_WORDS','我操|你妈逼|傻逼|共产党|胡锦涛|fuck');
	
?>